package com.ty.controller;

import com.ty.entity.OutItemQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ty.entity.OutItem;
import com.ty.service.OutItemService;

import java.util.List;

/**
 * 销售出库单;(212_out_item)控制层
 * @author : heimi
 * @date : 2025-6-10
 */
@RestController
@RequestMapping("/api/outItem")
public class OutItemController{
    @Autowired
    private OutItemService outItemService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<OutItem> select(OutItemQuery query){
        return outItemService.select(query);
    }
    
    @PostMapping 
    public Integer insert(@RequestBody OutItem product){
       return outItemService.insert(product);
    }
    
    @PutMapping 
    public Integer update(@RequestBody OutItem product){
        return outItemService.update(product);
    }
    
    @DeleteMapping
    public Integer delete(Integer id){
        return outItemService.delete(id);
    }
}